/**
 * Created by zhujiaming on 2017/5/15.
 */

const initalState = {
    showLoading: false
}
export function compReducer(state = initalState, action) {
    switch (action.type) {
        case 'hideLoading':
            return {
                ...state,
                showLoading: false,
            };
        case 'showLoading':
            return {
                ...state,
                showLoading: true,
            };
        default:
            return {...state}
    }
}